package com.suke.czx.modules.express.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.suke.czx.common.utils.R;
import com.suke.czx.modules.express.entity.Express;
import com.suke.czx.modules.express.mapper.ExpressMapper;
import com.suke.czx.modules.express.service.ExpressService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 应用模块名称: 快递
 * 代码描述: 快递业务层
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2021/09/01 17:04:56
 */
@Service
@AllArgsConstructor
public class ExpressServiceImpl extends ServiceImpl<ExpressMapper, Express> implements ExpressService {

    private final ExpressMapper expressMapper;

    /**
     * 删除快递
     * @param expressId 快递编码
     * @param userId 操作者编码
     * @return VO
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R updateDelExpress(Long expressId, Long userId) {
        expressMapper.updateDelExpress(expressId, userId);
        return R.ok();
    }

}
